Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor (rule/function-result-limit): replace AST walker by iteration over declarations #1167

Merged
merged 3 commits into from
Dec 4, 2024

Conversation

chavacava
Copy link
Collaborator

Simplifies function-result-limit rule by replacing AST walker by an iteration over global declarations


ast.Walk(walker, file.AST)
if num > r.max {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about simplifying to

if num <= r.max {
   continue
}

@chavacava chavacava merged commit a31d590 into master Dec 4, 2024
5 checks passed
@denisvmedia denisvmedia deleted the refactor/function-result-limit branch December 5, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants